﻿using System.Data.SQLite;
using System.Windows;
using WpfApp1.Acme.ApplicationAttribute;
using WpfApp1.Acme.ApplicationClass;
using WpfApp1.Acme.TemplateImpl;
using WpfApp1.Exmple.UserService;

namespace WpfApp1 {
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    [ViewPage]
    [DataSource(typeof(SQLiteConnection))]
    [ComponentScan(new string[] { "Exmple" })]
    public partial class MainWindow : Window {
        public MainWindow() {
            InitializeComponent();
            ApplicationContext.run(typeof(MainWindow));
            ((UserService)ApplicationContext.getBean("userService")).getUser();
        }

        private void BtnClick(object sender, RoutedEventArgs e) {
            Toast.show("BtnClick method", ToastType.info);
        }

        private void BtnClickClose(object sender, RoutedEventArgs e) {
            Toast.show("Close BtnClick method", ToastType.error);
        }
    }
}
